/*******************************************************************************
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *  
 * Copyright (c) 2011 Michael Chan.
 ******************************************************************************/
package com.google.code.solrdimension.querymodifiers;

import java.util.List;

import org.apache.solr.client.solrj.SolrQuery;

import com.google.code.solrdimension.config.DimensionConfigWrapper;
import com.google.code.solrdimension.parsers.exception.SolrDimensionException;

/**
 * The QueryModifer modifies the {@link SolrQuery} according to the {@link DimensionConfigWrapper}
 * 
 * @author Michael Chan 
 *
 */
public interface QueryModifier {
    
    /**
     * Prepare the {@link SolrQuery} according to the content of {@link DimensionConfigWrapper}
     * 
     * @param query
     *              This should be a new instance of {@link SolrQuery}, must not be null. The {@link SolrQuery} 
     *              object will then be modified according to the {@link DimensionConfigWrapper}
     * @param solrDimensionConfig
     *              An instance of {@link DimensionConfigWrapper}, must not be null
     * @throws SolrDimensionException
     *              If any of the expected params is not present
     *              
     * @return The modified Query
     */
    public SolrQuery prepareQuery(SolrQuery query, DimensionConfigWrapper solrDimensionConfig) throws SolrDimensionException;
    
}
